package com.hwadee.springboot_lx.controller;

import com.hwadee.springboot_lx.entity.Analysis;
import com.hwadee.springboot_lx.entity.Behavior;
import com.hwadee.springboot_lx.entity.Grade;
import com.hwadee.springboot_lx.entity.Student;
import com.hwadee.springboot_lx.service.ResourceService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("/resouece")
public class ResourseController {
    @Resource
    private ResourceService resourceService;
    @GetMapping("/getStudent")
    public Student getStudentDetails(Long id){
        return resourceService.getStudentDetail(id);
    }
    @GetMapping("/getGrade")
    public List<Grade> getGradeDetails(Long id) {
        return resourceService.getGradeDetails(id);
    }
    @GetMapping("/getAnalysis")
    public List<Analysis> getAnalysisDetails(Long id){
        return resourceService.getAnalysisDetails(id);
    }
    @GetMapping("/getBehavior")
    public List<Behavior> getBehaviorDetails(Long id){
        return resourceService.getBehaviorDetails(id);
    }
}
